import React from 'react'
import Smart from './Smart';
import {Switch,Redirect,NavLink,DirectLink} from 'react-router-dom';
import {Route} from 'react-router';
import './talk.css'

const Search = () => {
    return (
        <div className="navSerach">
            <NavLink to='/home' >
                回到首页
            </NavLink>
           
            <NavLink to='/home/talk/smart' activeStyle={{color:'pink'}}>
                智能对话
            </NavLink>

        </div>
    )
}

const  Toys = () => {
    return (
        <div className="Toys_container">
            <Search/>
            <Switch>
                <Route exact path='/home/talk' render={() => {
                    return <Redirect to="/home/talk/smart"/>
                }}></Route>
                <Route path='/home/talk/smart'><Smart/></Route>
            </Switch>
            
        </div>
      
    )
}

export default Toys
